package com.example.demotest.service;

import com.example.demotest.pojo.*;
import com.example.demotest.pojo.dto.ProductEditDto;
import com.example.demotest.pojo.dto.ProductRequestDto;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Map;

public interface IProductService {
    //Product publish(ProductDto productDto);

    Product publish(ProductRequestDto request, Integer userId);

    Product getProductById(Integer productId);

    ResponseMessage<Object> editProduct(Integer productId, ProductEditDto request, Integer userId);

    ResponseMessage offSaleProduct(Integer productId, Integer userId);


    List<ProductCategory> getAllClassification();


    Page<Product> getProductsByCategory(
            Integer classificationId,
            int page,
            int size,
            String time,
            Boolean hot,
            String priceSort,
            Double minPrice,
            Double maxPrice
    );



    List<Product> getMyProduct(Integer userId, ProductSoldStatus statusSold, ProductCheckStatus statusCheck);

    ResponseMessage<Object> republishProduct(Integer productId, Integer userId);

    void incrementViewCount(Integer productId);
}
